package com.hqyj.pojo;

import com.baomidou.mybatisplus.annotation.IdType;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 
 * </p>
 *
 * @author rock
 * @since 2021-10-20
 */
@Data
@TableName("employee_information")
public class EmployeeInformation extends MyPage implements Serializable {

    private static final long serialVersionUID=1L;

    @TableId(value = "employee_id", type = IdType.AUTO)
    private Integer employeeId;
    @TableField(value = "employee_name")
    private String employeeName;
    @TableField(value = "gender")
    private String gender;

    public String getBirthday() {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        if(this.birthday!=null){
           return sdf.format(this.birthday);
        }
        return "";
    }

    public void setBirthday(String birthday) {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");

        try {
            this.birthday = sdf.parse(birthday);
        } catch (ParseException e) {
            e.printStackTrace();
        }
    }

    @TableField(value = "birthday")
    private Date birthday;
    @TableField(value = "tel")
    private String tel;
    @TableField(value = "email_address")
    private String emailAddress;
    @TableField(value = "education")
    private String education;
    @TableField(value = "department")
    private String department;
    @TableField(value = "post")
    private String post;

    public String getEntryTime() {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        if(this.entryTime!=null){
            return sdf.format(this.entryTime);
        }
        return "";

    }

    public void setEntryTime(String entryTime) {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");

        try {
            this.entryTime = sdf.parse(entryTime);
        } catch (ParseException e) {
            e.printStackTrace();
        }
    }

    @TableField(value = "entry_time")
    private Date entryTime;
    @TableField(value = "personnel_status")
    private String personnelStatus;
    @TableField(value = "remarks")
    private String remarks;


}
